#----6.3

# def fibs(num):
# 	result = [0,1]
# 	for i in range(num-2):
# 		result.append(result[-2]+result[-1])
# 	return result;
# print fibs(33);

#----6.3.1 record func

# def square(x):
# 	"Calculate the square of the number x "
# 	return x*x

# print square.__doc__

# print help(square)


#----6.4 param magic

#----6.4-2 can i change param 


# def try_to_change(n):
# 	n = "mr .Gumby"

# name  = "lx z>>>>"

# try_to_change(name);

# print name;


#equl to ----

# name = "e332423";
# nic = name;
# nic = "lxx"
# print name

#---- change pointer
# def change(n):
# 	n[0] = "Mr.Gumby"
# names = ["Mr.Enity","Mrs.Thing"]
# change(names);
# print names;

# names = ["Mr.Enity","Mrs.Thing"]
# n = names;
# n[0] = "haha"
# print names;


#---- 6.4.4 colect param

# def printParam(firstP,*param):
# 	print firstP
# 	print param

# printParam("333",3,3,3,4)


# def printParam_4(x,y,z = 3,*pospar,**keypar):
# 	print x,y,z
# 	print pospar
# 	print keypar

# printParam_4(2,3,4,332,44,fff = 3,ddd= 4)


# def init(data):
# 	data['first'] = {};
# 	data['middle'] = {};
# 	data['last'] = {};
# def lookup(data,label,name):
# 	return data[label].get(name);

# def  store(data,*full_names):
# 	for full_name in full_names:
# 		names = full_name.split()
# 		if len(names) == 2:names.insert(1,'');
# 		labels = 'first','middle','last'
# 		for label,name in zip(labels,names):		
# 			people = lookup(data,label,name)
# 			if people:
# 				people.append(full_name)
# 			else:
# 				data[label][name] = [full_name]


# d = {}
# init(d);
# store(d,'Han Solo',"11")
# store(d,'luke Skywalker','Anakin Skywalker')
# lookup(d,"last",'Skywalker');
# print d;  


#----6.4.5

# def add(x,y):
# 	return x + y
# param = (1,2)
# print add(*param)

# def with_stars(**kwds):
# 	print kwds["name"],"is",kwds['age'],'year old';

# def Without_stars(kwds):
# 	print kwds["name"],"is",kwds['age'],'year old';

# args = {"name":"Mr,Gumby","age":43}
# with_stars(**args)
# # with_stars(args)
# Without_stars(**args)
# # Without_stars(args);


#----6.5 scope
